<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>蝴蝶教程（jc2182.com）</title>
    <style>
        .item1 { grid-area: 1 / 1 / 2 / 2; }
        .item2 { grid-area: 1 / 2 / 3 / 3; }
        .item3 { grid-area: 1 / 3 / 2 / 4; }
        .item4 { grid-area: 2 / 1 / 3 / 2; }
        .item6 { grid-area: 2 / 3 / 3 / 4; }

        .grid-container {
            display: grid;
            grid-auto-rows: 150px;
            grid-gap: 10px;
            background-color: #2196F3;
            padding: 10px;
            min-width: 800px;
        }

        .grid-container > div {
            background-color: rgba(255, 255, 255, 0.8);
            text-align: center;
            padding: 20px 0;
            font-size: 30px;
        }
    </style>
</head>
<body>

<h1>grid布局属性</h1>

<p>使用<em> grid-auto-rows </em>属性为所有行设置默认大小（高度）。</p>
<p>将大小设置为每行150像素：</p>

<div class="grid-container">
    <div class="item1">1</div>
    <div class="item2">2</div>
    <div class="item3">3</div>
    <div class="item4">4</div>
    <div class="item6">6</div>
</div>

<p> <strong>注意：</strong> grid-template-rows属性会覆盖此属性。</p>
</body>
</html>